<%@ page contentType="text/html; charset=utf-8" language="java" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="com.sanqing.po.Department" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>人力资源管理系统</title>
<link rel="stylesheet" rev="stylesheet" href="../css/style.css " type="text/css" media="all" />
<style type="text/css">
<!--
.atten {font-size:12px;font-weight:normal;color:#F00;}
-->
</style>
</head>
<body class="ContentBody">
<div class="MainDiv">
<table width="99%" border="0" cellpadding="0" cellspacing="0" class="CContent">
  <tr>
      <th class="tablestyle_title" >部门详细信息</th>
  </tr>
  <%
  Department dept = (Department)request.getAttribute("dept");
  if(dept!=null){ 
  %>
		<TR>
			<TD width="100%">
				<fieldset style="height:100%;">
					  <table border="0" cellpadding="8" cellspacing="1" style="width:100%">
					  <tr>
					    <td nowrap align="right" width="11%">部门编号：</td>
					    <td align="left"><%=dept.getId() %>&nbsp;</td>
					    </tr>
					  <tr>
					    <td nowrap align="right" width="11%">部门名称：</td>
					    <td align="left"><%=dept.getName() %>&nbsp;</td>
					    </tr>
					  <tr>
					    <td nowrap align="right">联系电话：</td>
					    <td align="left"><%=dept.getPhone() %>&nbsp;</td>
					  </tr>
					    
					  <tr>
					    <td width="11%" nowrap align="right">上级部门：</td>
					    <td align="left" >
					    <%if(dept.getParent()!=null){out.print(dept.getParent().getName());}%>&nbsp;
					    </td>
					  </tr>
						  <tr>
						    <td width="11%" height="22" align="center" >下级部门：</td>
						    <td height="22" align="left" >
						    <%Iterator it=dept.getChildren().iterator();
						    while(it.hasNext()){
						    Department child=(Department)it.next();
						    out.print(child.getName());}%>
						    &nbsp;</td>
						  </tr>
						  <tr>
						    <td width="11%" height="22" align="center" >部门描述：</td>
						    <td height="22" align="left" ><%=dept.getIntroduction() %>&nbsp;</td>
						  </tr>
					  </table>
				</fieldset>			
				</TD>
		</TR>
		<tr>
          <td height="22" colspan="4" align="center" >
          <a href="dept.do?method=getDetail&id=<%=dept.getId()%>&act=update">更新</a>&nbsp;&nbsp;<a href="dept.do?method=delete&id=<%=dept.getId()%>">删除</a></td>
  	    </tr>
		<%}else{ %>
  	<tr>
    <td height="22" colspan="4" align="center" >该信息不存在！！！</td>
  	</tr>
  	<%} %>
</table>	
</div>
</body>
</html>

